﻿using System;
using System.Drawing;
using System.Xml.Serialization;

namespace LevelEditor.Document
{
    [Serializable]
    public class TileDefinition
    {

        #region Properties

        /// <summary>
        /// Is this tile an obstacle for the player via the x-axis?
        /// </summary>
        [XmlAttribute]
        public bool Obstacle { get; set; }

        /// <summary>
        /// Is this tile an obstacle for the player via the y-axis?
        /// </summary>
        [XmlAttribute]
        public bool Platform { get; set; }

        /// <summary>
        /// Amount of damage this tile does to the player if collision occurs
        /// </summary>
        [XmlAttribute]
        public int Damage { get; set; }

        /// <summary>
        /// Left floor position of tile for slopes
        /// </summary>
        [XmlAttribute]
        public uint LeftFloor { get; set; }

        /// <summary>
        /// Right floor position of tile for slopes
        /// </summary>
        [XmlAttribute]
        public uint RightFloor { get; set; }

        #endregion

        #region Constructors

        public TileDefinition()
        {
        }

        public TileDefinition(TileDefinition copy)
        {
            Obstacle = copy.Obstacle;
            Platform = copy.Platform;
            Damage = copy.Damage;
            LeftFloor = copy.LeftFloor;
            RightFloor = copy.RightFloor;
        }

        #endregion

    }
}
